package com.zy.qudadid.ui.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.zy.lcpassenger.R;
import com.zy.qudadid.model.About;
import com.zy.qudadid.presenter.OwnContactPresenter;
import com.zy.qudadid.ui.activity.base.ToolBarActivity;
import com.zy.qudadid.ui.view.OwnContactView;

import butterknife.Bind;

/**
 * Created by ninos on 2016/7/29.
 */
public class OwnContactActivity extends ToolBarActivity<OwnContactPresenter> implements OwnContactView{

    @Bind(R.id.oc_title)TextView oc_title;
    @Bind(R.id.oc_phone)TextView oc_phone;
    @Bind(R.id.oc_website)TextView oc_website;
    @Bind(R.id.oa_com)TextView oa_com;

    @Override
    protected CharSequence provideTitle() {
        return "联系我们";
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_own_contact;
    }

    @Override
    protected void initThings(Bundle savedInstanceState) {
        super.initThings(savedInstanceState);
        presenter.GetCityList();
    }

    @Override
    public void initListeners() {

    }

    @Override
    public OwnContactPresenter createPresenter() {
        return new OwnContactPresenter();
    }

    @Override
    public void success(About about) {
        oc_title.setText(about.title);
        oc_phone.setText("电话："+about.mobile);
        oc_website.setText("网站："+about.url);
        oa_com.setText(about.content);
    }

    @Override
    public void error() {

    }
}
